package com.zito.pojo;

import java.util.List;

import com.downlove.database.POJO;
import com.downlove.database.QueryHelper;

public class AdminPOJO extends POJO {

	private String _password;

	public String getUpass() {
		return _password;
	}

	public void setUpass(String upass) {
		this._password = upass;
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = -3638230221209609315L;

	@SuppressWarnings("unchecked")
	public List<? extends POJO> allList() {
		List<Long> tmpList = idList(1, TotalCount());
		// System.out.println("TotalCount():"+LoadList(tmpList).size());
		return this.LoadList(tmpList);
	}

	public boolean changePass() {
		String sql = "update " + TableName() + " set upass=? where id=?";
		int tmp = QueryHelper.update(sql, getUpass(), getId());
		if (tmp>0){
			Evict(true);
		}
		return true;
	}

}
